#include <iostream>
using namespace std;

/*
	const修饰指针赋值给非const修饰
*/

class Cat
{
	
};

int main()
{
	int a=89;
	const int *p=&a;
	
	//编译报错：右边是const修饰，左边非const
	//int *q=p;
	
	//编译正确，转换成功
	int *q=const_cast<int *>(p);
	
	Cat c1;
	const Cat *catp=&c1;
	Cat *catq=const_cast<Cat *>(catp);	
}